package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-16
 */
public class Description implements Sequenceable, Serializable {
    @SerializedName("simpleText")
    private String simpleText;

    public static final Sequenceable.Producer<Description> CREATOR = new Producer<Description>() {
        @Override
        public Description createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            Description description = new Description();
            description.unmarshalling(parcel);
            return description;
        }
    };

    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeString(this.simpleText);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        this.simpleText=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "Description{" +
                "simpleText = '" + simpleText + '\'' +
                "}";
    }

    public String getSimpleText() {
        return simpleText;
    }

    public void setSimpleText(String simpleText) {
        this.simpleText = simpleText;
    }
}
